﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin/Admin.Master" Inherits="System.Web.Mvc.ViewPage<ShopOnline.Models.Advert>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link href="../../Content/Styles/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine-en.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine.js" type="text/javascript"></script>
         <script>
             jQuery(document).ready(function () {
                 // binds form submission and fields to the validation engine
                 jQuery("#formID").validationEngine();
             });         
        </script>
<div class="w_container m10-tb  fl">
        <div class="w_container fl">
            <div class="titleheader bold fl">
                Administration Session
            </div>
            <div class="titleheader fr">
                Back to <a class="orange" href="/Admin/Index">Cpanel</a></div>
            <div class="w_container titleheader fl align-l">
                <div class="fl">
                    Cpanel |
                </div>
                <div class="orange fl">
                    chỉnh sửa Công trình
                </div>
            </div>
        </div>
       <div class="w_container m10-tb  fl">
            <div class="sub_container fl">
                <form method="post" enctype="multipart/form-data" id="formID" class="formular">
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Tên công trình
                    </div>
                    <div class="input-item fl">
                        <input type="text" id="AdvertName" name="AdvertName" class="validate[required]" value="<%=Model.AdvertName %>"/>
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                        Sơ lược
                    </div>
                    <div class="input-item fl">
                       <textarea id="description" name="description" style = "width: 99%; height:150px;" class="validate[required]" ><%= Model.Description %></textarea>
                    </div>
                </div>

               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Hình ảnh
                    </div>
                    <div class="input-item fl">
                       <img src="../../Content/AdvertImages/<%= Model.Image%>" width="100px" height="100px" />
                                <%= Html.ActionLink("EditImage", "EditImage", new { id = Model.Id }, new { @class = "ui-state-default ui-corner-all button fl" })%> 
                    </div>
                </div>
               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Đường dẫn liên kết 
                    </div>
                    <div class="input-item fl">
                         <input type="text" id="url" name="url" class="validate[required]" value="<%= Model.Link %>" />
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Độ ưu tiên 
                    </div>
                    <div class="input-item fl">
                         <input type="text" id="Priority" name="Priority"  class='validate[required,custom[integer]]' value="<%= Model.Priority %>" />
                    </div>
                </div>
               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Hiển thị
                    </div>
                    <div class="input-item fl">
                        <%=Html.CheckBox("show",Model.Show)%>
                    </div>
                </div>                
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                        &nbsp;
                    </div>
                    <div class="input-item fl">
                        <input type="submit" value="Lưu" class="ui-state-default ui-corner-all button fl" />
                        <a class="ui-state-default ui-corner-all button fl" href="/Advert/AdminListAdvert">
                            Hủy Bỏ </a>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</asp:Content>

